package Controller;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/demo")
public class HelloController {

    @Value("${cupSize}")//注意写法,获取配置文件中的cupSize
    private String cpuSize;

    @Value("${age}")
    private int age;

    @Value("${content}")
    private String content;


//    @RequestMapping(value="/hello",method=RequestMethod.GET)
    @GetMapping(value="/hello")
    public String say(@RequestParam("name") String myName){
        return "Hello :"+myName;
    }
}